#include<bits/stdc++.h>
using namespace std;
const int N=100010;
int n,cnt,cnt1;
int a[N],t;
int l,r,mid;

int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    int cnt=n;
    for(int i=1;i<=n;i++)
        cin>>a[i];
    for(int i=1;i<=n;i++)
    for(int j=1;j<=n;j++){
        if(a[i]<a[j]) {t=a[j];
        a[j]=a[i];
        a[i]=t;
        }
    }
    int l=1,r=n;
    int mid=n/2;
    while(l<mid<r){
        if(a[mid]>a[l]) cnt--;
        if(a[r]>a[mid]) cnt--;
        l++;
        r--;
    }

    cout<<cnt;


   return 0;
}
